package ws.very.util.langDetect
import com.cybozu.labs.langdetect.DetectorFactory
import scala.util.Try
import scala.util.Properties


trait Detector {
  def profileDir: S

  DetectorFactory.loadProfile(profileDir)

  def apply(s: S) = Try {
    val d = DetectorFactory.create()
    d.append(s)
    d.detect()
  }

}